package com.mb.app.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.mb.app.domain.TbMemberInfo;
import com.mb.app.dao.TbMemberInfoMapper;
import com.mb.app.service.ITbMemberInfoService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 会员表  服务实现类
 * </p>
 *
 * @author zwl
 * @since 2019-04-22
 */
@Service
public class TbMemberInfoServiceImpl extends ServiceImpl<TbMemberInfoMapper, TbMemberInfo> implements ITbMemberInfoService {

    @Override
    public List<TbMemberInfo> queryList(Map<String, Object> map) {
        List<TbMemberInfo> list = this.baseMapper.lst(map);
        return list;
    }

    @Override
    public int count(Map<String, Object> map) {
        return this.baseMapper.count(map);
    }


    @Override
    public int remove(Long memberId) {
//        return this.baseMapper.deleteById(appId);
        TbMemberInfo TbMemberInfo = new TbMemberInfo();
        TbMemberInfo.setDataStatus(0);
        TbMemberInfo.setMemberId(memberId);
        return this.baseMapper.updateById(TbMemberInfo);
    }

    @Override
    public int status(Long memberId,Integer userstatus) {
//        return this.baseMapper.deleteById(appId);
        TbMemberInfo TbMemberInfo = new TbMemberInfo();
        TbMemberInfo.setStatus(userstatus);
        TbMemberInfo.setMemberId(memberId);
        return this.baseMapper.updateById(TbMemberInfo);
    }
	
}
